public class StringBufferTest {
    public static void main(String[] args) {
        //调用构造方法设置容量为25
        StringBuffer s1 = new StringBuffer(25);
        System.out.println(s1.capacity());;
        //求数组长度
        System.out.println(s1.length());
        StringBuffer s2 = new StringBuffer();
        //s2初始容量为16个字符
        System.out.println(s2.capacity());
        StringBuffer s3 = new StringBuffer("ABCD");
        //插入字符
        s3.insert(0,'C');
        s3.insert(2,'E');
        Integer i = Integer.valueOf("123");
        Long li = Long.valueOf("123");
        Short si = Short.valueOf("123");
        Float fi = Float.valueOf("12.56");
        Double di = Double.valueOf("12.56");
        System.out.print(i+" ");
        System.out.print(li+" ");
        System.out.print(si+" ");
        System.out.print(fi+" ");
        System.out.print(di+" ");
    }
}
